package com.allwees.bs.module.pms.wf;

import com.baomidou.mybatisplus.core.enums.IEnum;
import com.allwees.core.common.constant.EStatus;
import com.allwees.core.wf.Action;

/**
 * 供应商商品上架动作
 *
 * @author yangylsky
 * @since 2019-12-09
 *
 */
public enum ESupplierProductAction implements Action, IEnum<String> {
	//SUPPLIER ACTION
	/**
	 * 供应商提审
	 */
	SUPPLIER_COMMIT("提交审核", EStatus.WAIT_AUDIT),

	/**
	 * 供应商更改价格
	 */
	SUPPLIER_ADJUST_PRICE("更改价格", EStatus.WAIT_AUDIT),

	/**
	 * 供应商撤回提审
	 */
	SUPPLIER_CANCEL("撤回审核", EStatus.CREATED),

	/**
	 * 供应商上架
	 */
	SUPPLIER_PUTON("商户上架", EStatus.NORMAL),

	/**
	 * 供应商下架
	 */
	SUPPLIER_PUTOFF("商户下架", EStatus.PUTOFF_ONESELF),
	//end of SUPPLIER ACTION

	//PLATFORM ACTION
	/**
	 * 平台审核拒绝
	 */
	PLATFORM_AUDIT_REJECTED("平台审核拒绝", EStatus.AUDIT_REJECTED),

	/**
	 * 平台审核通过
	 */
	PLATFORM_AUDIT_APPROVED("平台审核通过", EStatus.AUDIT_APPROVED),

	/**
	 * 平台确认并上架
	 */
	PLATFORM_CONFIRM_PUTON("平台确认上架", EStatus.NORMAL),

	/**
	 * 平台下架
	 */
	PLATFORM_PUTOFF("平台下架", EStatus.PUTOFF_QA_FAILURE);
	//end of PLATFORM ACTION

	private String desc;

	private EStatus afterActionStatus;

	ESupplierProductAction() {
		this(null);
	}

	ESupplierProductAction(EStatus afterActionStatus) {
		this.afterActionStatus = afterActionStatus;
	}

	ESupplierProductAction(String desc, EStatus afterActionStatus) {
		this.desc = desc;
		this.afterActionStatus = afterActionStatus;
	}

	@Override
	public String desc() {
		return desc;
	}

	@Override
	public EStatus afterActionStatus() {
		return afterActionStatus;
	}

	@Override
	public String getValue() {
		return name();
	}
}
